package com.fawkes.basic.a1java.lamda;

import java.util.Arrays;
import java.util.List;
import java.util.Objects;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.function.Predicate;

/***
 * @author: hels
 * @description:
 * @date: 2022-12-2 11:38
 **/
public class LamdaException {
    public static void main(String[] args) {
        List<Integer> integers = Arrays.asList(1, 2, 34, 5,  5);
        integers.forEach(integer -> {
            try {
                System.out.println(50 / integer);
            } catch (Exception e) {
//                e.printStackTrace();
                throw new RuntimeException(e);
            }
        });
//        integers.forEach(LamdaException.of(i -> System.out.println(i)));

        Predicate<String> pre = s -> {
            System.out.println(s);return false;};
        pre.test("hhh");
    }
}
